<?php session_start(); ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ประกันภัยรถยนต์</title>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script type="text/javascript">
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<script type="text/javascript" src="Scripts/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="Scripts/stepcarousel.js"></script>
</head>

<body>
<table width="918" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="421"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="10"><img src="images/bg-hd1.jpg" width="10" height="421"></td>
        <td bgcolor="#FFFFFF"><object id="FlashID2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1117" height="432">
          <param name="movie" value="flash/header.swf">
          <param name="quality" value="high">
          <param name="wmode" value="transparent">
          <param name="swfversion" value="6.0.65.0">
          <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
          <param name="expressinstall" value="Scripts/expressInstall.swf">
          <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="flash/header.swf" width="1117" height="432">
            <!--<![endif]-->
            <param name="quality" value="high">
            <param name="wmode" value="transparent">
            <param name="swfversion" value="6.0.65.0">
            <param name="expressinstall" value="Scripts/expressInstall.swf">
            <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
            <div>
              <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
              <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object></td>
        <td width="9" align="right"><img src="images/bg-hd2.jpg" width="9" height="421"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="9" valign="top" background="images/bgl2.jpg"><img src="images/bgl.jpg" width="9" height="338" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td background="images/bg-menu.jpg">
            <?php include "top_menu.php"; ?>
            </td>
          </tr>
          <tr>
            <td height="3" bgcolor="#FFFFFF"><img src="images/spacer.gif" width="1" height="3" /></td>
          </tr>
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="9"><img src="images/pblog08.jpg" width="9" height="43" alt="" /></td>
                <td align="center" background="images/pblog09.jpg"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="874" height="39">
                  <param name="movie" value="flash/banner1.swf">
                  <param name="quality" value="high">
                  <param name="wmode" value="transparent">
                  <param name="swfversion" value="6.0.65.0">
                  <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
                  <param name="expressinstall" value="Scripts/expressInstall.swf">
                  <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                  <!--[if !IE]>-->
                  <object type="application/x-shockwave-flash" data="flash/banner1.swf" width="874" height="39">
                    <!--<![endif]-->
                    <param name="quality" value="high">
                    <param name="wmode" value="transparent">
                    <param name="swfversion" value="6.0.65.0">
                    <param name="expressinstall" value="Scripts/expressInstall.swf">
                    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                    <div>
                      <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                      <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                    </div>
                    <!--[if !IE]>-->
                  </object>
                  <!--<![endif]-->
                </object></td>
                <td width="9"><img src="images/pblog10.jpg" width="9" height="43" alt="" /></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php include 'gallery.php'; ?></td>
                    <td width="20">&nbsp;</td>
                    <td width="18" align="left"><a href="javascript:stepcarousel.stepBy('mygallery', 3)"><img src="images/banner-next.jpg" title="Next &gt;&gt;"  border="0" /></a></td>
                    <td width="15" align="left">&nbsp;</td>
                  </tr>
                </table></td>
                <td width="8" bgcolor="#FFFFFF">&nbsp;</td>
                </tr>
            </table></td>
          </tr>
          <tr>
            <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="10"><img src="images/spacer.gif" width="1" height="10" /></td>
              </tr>
              <tr>
                <td height="14"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="20">&nbsp;</td>
                    <td background="images/pblog11.jpg"><img src="images/welcome.jpg" width="284" height="37" alt="" /></td>
                    <td width="10">&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              <tr>
                <td height="14"><img src="images/spacer.gif" width="1" height="14" /></td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="8" bgcolor="#FFFFFF">&nbsp;</td>
                    <td width="270" valign="top" bgcolor="#212121">
                    <!--side-->
                    <?php include "side.php"; ?>
                      <!--  Side-->
                        </td>
                    <td width="18"><img src="images/spacer.gif" width="18" height="1" /></td>
                    <td valign="top">
<?php

$sql = "select * from tb_order where invoice = '".$_GET['order']."' and unique_id = '".$_GET['sid']."'";
$qr = select($sql);
$rs = $qr[0];
if(count($qr)==0)
{
	echo "<script>alert('ไม่พบข้อมูลในระบบ');window.location='index.php';</script>";
	exit();	
}
?>

                      <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="5"><img src="images/pblog01.jpg" width="5" height="42" /></td>
                                  <td background="images/pblog13.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="15">&nbsp;</td>
                                      <td><h2>รายละเอียดการสั่งซื้อ >> ข้อมูลบุคคลและจัดส่ง >> ข้อมูลรถยนต์ >><span class="text7"> เสร็จสิ้น</span></h2></td>
                                    </tr>
                                  </table></td>
                                  <td width="4"><img src="images/pblog12.jpg" width="4" height="42" alt="" /></td>
                                </tr>
                              </table></td>
                            </tr>
                            <tr>
                              <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td width="12" background="images/pblog23.jpg"><img src="images/pblog23.jpg" width="12" height="2" alt="" /></td>
                                  <td bgcolor="#E2E2E2" class="links">
                                  
                           <br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#000000">
  <tr>
                                      <td height="30" align="center" bgcolor="#003333" class="text4"><strong>ข้อมูลการสั่งซื้อ(เลขที่ใบสั่งซื้อ : <?=$rs['invoice']?>) </strong><a href="print.php?order=<?=$_GET['order']?>&sid=<?=$_GET['sid']?>"><img src="images/printer.png" width="16" height="16" alt=""></a></td>
                                      </tr>
                                    <tr>
                                      <td height="50" align="center" bgcolor="#E2E2E2"><br>
                                        <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" style="border:1px solid #000;">
                                          <tr>
                                            <td colspan="2" align="center" bgcolor="#CC0000" class="text4"><strong>รายละเอียดการสั่งซื้อ</strong></td>
                                          </tr>
                                          <tr>
                                            <td align="right" >เลขที่ใบสั่งซื้อ :</td>
                                            <td align="left"><?=$rs['invoice']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right" >วันที่เริ่มต้นคุ้มครอง :</td>
                                            <td align="left"><?=$rs['date_start']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right" >ยอดชำระ :</td>
                                            <td align="left"><?=$rs['price']?></td>
                                          </tr>
                                          <tr>
                                            <td colspan="2" align="center" bgcolor="#CC0000" class="text4"><strong>รายละเอียดผู้เอาประกัน</strong></td>
                                          </tr>
                                          <tr>
                                            <td width="50%" align="right" >ชื่อ-นามสกุล :</td>
                                            <td width="50%" align="left"><?=$rs['name']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right" >ที่อยู่จัดส่ง :</td>
                                            <td align="left"><?=$rs['address']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right" >จังหวัด :</td>
                                            <td align="left"><?=$rs['province']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right" >เบอร์โทรศัพท์ :</td>
                                            <td align="left"><?=$rs['tel']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">อีเมลล์ :</td>
                                            <td align="left"><?=$rs['email']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">รายละเอียดอื่นๆ :</td>
                                            <td align="left"><?=$rs['detail']?></td>
                                          </tr>
                                        </table>
                                        <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" style="border:1px solid #000;">
                                          <tr>
                                            <td colspan="2" align="center" bgcolor="#CC0000" class="text4"><strong>ข้อมูลรถ</strong></td>
                                          </tr>
                                          <tr>
                                            <td width="50%" align="right">ลักษณะรถยนต์ :</td>
                                            <td width="50%" align="left"><?=$rs['car_type']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">ลักษณะการใช้รถยนต์ :</td>
                                            <td align="left"><?=$rs['use_type']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">ยี่ห้อรถ :</td>
                                            <td align="left"><?=$rs['car_brand']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">รุ่นรถ :</td>
                                            <td align="left"><?=$rs['car_model']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">ปีรถ :</td>
                                            <td align="left"><?=$rs['car_year']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">เลขทะเบียน :</td>
                                            <td align="left"><?=$rs['car_no']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">ขนาดเครื่องยนต์ :</td>
                                            <td align="left"><?=$rs['car_cc']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">เลขตัวถัง :</td>
                                            <td align="left"><?=$rs['car_sn']?></td>
                                          </tr>
                                          <tr>
                                            <td align="right">วันที่ต้องการเริ่มคุ้มครอง :</td>
                                            <td align="left"><?=$rs['date_start']?></td>
                                          </tr>
                                        </table>
                                        <br></td>
                                    </tr>
                                    <tr>
                                      <td height="30" align="center" bgcolor="#003333" class="text4"><strong>รายละเอียดช่องทางการชำระเงิน</strong></td>
                                    </tr>
                                    <tr>
                                      <td align="center" bgcolor="#E2E2E2" ><br>
                                      <table width="100%" border="0" align="left" cellpadding="5" cellspacing="1" bgcolor="#000000">
                                        <tr>
                                          <td colspan="2" bgcolor="#CC0000"><span class="text4"><strong>ผ่าน บจก.เซ็นทรัล อินชัวรันส์ โบรคเกอร์</strong></span></td>
                                        </tr>
                                        <tr>
                                          <td align="center" bgcolor="#E2E2E2">ชำระสดเงินโอน<br></td>
                                          <td bgcolor="#E2E2E2"><table border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                                            <tr class="text4">
                                              <td align="center" bgcolor="#CC0000">ชื่อบัญชี</td>
                                              <td align="center" bgcolor="#CC0000">ประเภท</td>
                                              <td align="center" bgcolor="#CC0000">ธนาคาร</td>
                                              <td align="center" bgcolor="#CC0000">เลขบัญชี</td>
                                            </tr>
                                            <tr class="text1">
                                              <td rowspan="3" bgcolor="#FFFFFF">บจก. เซ็นทรัล อินชัวรันส์ โบรคเกอร์</td>
                                              <td rowspan="3" bgcolor="#FFFFFF">ออมทรัพย์</td>
                                              <td bgcolor="#FFFFFF">กสิกรไทย สำนักสีลม</td>
                                              <td bgcolor="#FFFFFF">789-2-16543-7</td>
                                            </tr>
                                            <tr class="text1">
                                              <td bgcolor="#FFFFFF">ไทยพาณิชย์ สาขา สุรวงศ 2</td>
                                              <td bgcolor="#FFFFFF">064-234-385-6</td>
                                            </tr>
                                            <tr class="text1">
                                              <td bgcolor="#FFFFFF">กรุงไทย สาขา สุรวงศ์</td>
                                              <td bgcolor="#FFFFFF">023-0-12161-6</td>
                                            </tr>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td align="center" bgcolor="#E2E2E2">ชำระผ่านบัตรเครดิต</td>
                                          <td bgcolor="#E2E2E2"><table border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                                            <tr class="text1">
                                              <td align="center" bgcolor="#FFFFFF">เซ็นทรัล กรุงศรี(มีค่าธรรมเนียม)</td>
                                              <td align="center" bgcolor="#FFFFFF"><a href="credit/ตัดบัตร เซ็นทรัล กรุงศรี(มีค่าธรรมเนียม).pdf" target="_blank">ดาวน์โหลด</a></td>
                                              </tr>
                                            <tr class="text1">
                                              <td align="center" bgcolor="#FFFFFF"> เซ็นทรัล SCB (มีค่าธรรมเนียม)</td>
                                              <td align="center" bgcolor="#FFFFFF"><a href="credit/ตัดบัตร เซ็นทรัล SCB (มีค่าธรรมเนียม).pdf" target="_blank">ดาวน์โหลด</a></td>
                                            </tr>
                                            </table></td>
                                        </tr>
                                        <tr>
                                          <td colspan="2" align="left" bgcolor="#CC0000" class="text4"><strong>ผ่านบริษัทประกันโดยตรง</strong></td>
                                          </tr>
                                        <tr>
                                          <td align="center" bgcolor="#E2E2E2">ชำระสดเงินโอน</td>
                                          <td bgcolor="#E2E2E2"><table border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                                            <tr class="text4">
                                              <td align="center" bgcolor="#CC0000">ชื่อบัญชี</td>
                                              <td align="center" bgcolor="#CC0000">ประเภท</td>
                                              <td align="center" bgcolor="#CC0000">ธนาคาร</td>
                                              <td align="center" bgcolor="#CC0000">เลขบัญชี</td>
                                            </tr>
                                            <?php
												$sql = "select * from tb_insure where id = '".$rs['insure_id']."'";
												$qr = select($sql);
												$rs = $qr[0];
												
												$sql = "select * from tb_account where company_id = '".$rs['company_id']."'";
												$qr = select($sql);
												$i=0;
												while($i<count($qr))
												{
													$rs = $qr[$i];
													$sql2 = "select * from tb_company where id = '".$rs['company_id']."'";
													$qr2 = select($sql2);
													$rs2 = $qr2[0];
													$i++;
											?>
                                            <tr class="text1">
                                              <td bgcolor="#FFFFFF"><?=$rs2['company_name']?></td>
                                              <td bgcolor="#FFFFFF"><?=$rs['acc_type']?></td>
                                              <td bgcolor="#FFFFFF"><?=$rs['acc_name']?></td>
                                              <td bgcolor="#FFFFFF"><?=$rs['acc_number']?></td>
                                            </tr>
                                            <?php
												}
											?>
                                          </table></td>
                                        </tr>
                                        <tr>
                                          <td align="center" bgcolor="#E2E2E2">ชำระผ่านบัตรเครดิต</td>
                                          <td bgcolor="#E2E2E2"><table border="0" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
                                          <?php
												$sql = "select * from tb_credit where company_id = '".$rs['company_id']."'";
												$qr = select($sql);
												$i=0;
												while($i<count($qr))
												{
													$rs = $qr[$i];
													$sql2 = "select * from tb_company where id = '".$rs['company_id']."'";
													$qr2 = select($sql2);
													$rs2 = $qr2[0];
													$i++;
											?>
                                            <tr class="text1">
                                              <td align="center" bgcolor="#FFFFFF"><?=$rs['name']?></td>
                                              <td align="center" bgcolor="#FFFFFF"><a href="credit/<?=$rs['file']?>" target="_blank">ดาวน์โหลด</a></td>
                                            </tr>
                                            <?
												}
											?>
                                          </table></td>
                                        </tr>
                                      </table>
                                    </td>
                                    </tr>
                                    </table>
                                  <br>
                                  <br></td>
                                  <td background="images/pblog24.jpg"><img src="images/pblog24.jpg" width="12" height="2" alt="" /></td>
                                </tr>
                                <tr>
                                  <td><img src="images/pblog02.jpg" width="12" height="17" alt="" /></td>
                                  <td background="images/pblog03.jpg">&nbsp;</td>
                                  <td width="12"><img src="images/pblog04.jpg" width="12" height="17" alt="" /></td>
                                </tr>
                              </table></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                        </tr>
                        </table>
                      </td>
                    <td width="8" bgcolor="#FFFFFF">&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
              </table></td>
          </tr>
        </table></td>
        <td width="9" valign="top" background="images/bgr2.jpg"><img src="images/bgr.jpg" width="9" height="338" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="18"><img src="images/pblog05.jpg" width="18" height="19" alt="" /></td>
        <td background="images/pblog06.jpg">&nbsp;</td>
        <td width="18"><img src="images/pblog07.jpg" width="18" height="19" alt="" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center" class="menu2"><?php include "bot_menu.php"; ?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center"><?php include 'marquee.php'; ?></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<script type="text/javascript">
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
</script>
</body>
</html>
